package com.hq.base.dao;

import com.hq.common.domain.SearchObject;

import java.io.Serializable;
import java.util.List;

public interface IBaseDAO<T> {

	public int count(SearchObject search);

	/**
	 * 表主键为id时才能使用
	 * @param ids
	 */
	public void delete(List<Serializable> ids);

	public void delete(T instance);
	
	public T get(Serializable id);
	
	public List<T> get(Serializable[] ids);

    public List<T> get(T t);

	public List<T> get(SearchObject search);

	public int getCount(SearchObject search);
	
	public List<T> getAll();
	
	public Serializable save(T instance);
	
	public void save(List<T> list);
	
	public void saveOrUpdate(T instance);
	
	public void saveOrUpdateAll(List<T> list);
	
	public void update(T instance);

	public void update(List<T> list);
}
